<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/component/common.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>
    <title>检测详情</title>
    <link rel="stylesheet" href="${frames}/css/lib/bootstrap.min.css" type="text/css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/lib/dataTables.bootstrap.css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/paginate.css" type="text/css">
    <link rel="stylesheet" href="${newframe}/css/base/base.css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/table.css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/qulitity.css" type="text/css" type="text/css">
    <%@ include file="/WEB-INF/jsp/component/commonBottom.jsp" %>

</head>
<body>
<input type="hidden" id="mkMedicalInstrumenId" value="${mkMedicalInstrumenId}">
<div class="wrap">
    <div class="page-header">
        <ul class="page_nav">
            <li class="first cur">医卫士云平台&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;</li>
            <li class="cur">仪器监控&nbsp;&nbsp;&nbsp;&nbsp;&gt;&nbsp;&nbsp;&nbsp;&nbsp;</li>
            <li>检测详情</li>
        </ul>
    </div>
    <div id="tablepart">
        <table id="example" class="display" cellspacing="10" width="100%">
            <thead>
            <tr>
                <th>医院</th>
                <th>SN号</th>
                <th>中文名</th>
                <th>英文名</th>
                <th>检测结果</th>
                <th>检测时间</th>
            </tr>
            </thead>
        </table>
    </div>
</div>
<script>
    var table;
    function initTable() {
        table = $('#example').DataTable({
            "dom": "<'row'<'col-xs-2'l><'#mytool.col-xs-10'><'col-xs-6'f>r>" +
            "t" +
            "<'row'<'col-xs-6'i><'col-xs-6'p>>",
            "bFilter": false,//去掉搜索框
            "bAutoWidth": true, //自适应宽度
            "sPaginationType": "full_numbers",
            "ordering": false,//是否允许Datatables开启排序
            "bProcessing": true,
            "bServerSide": true,
            "sAjaxSource": "${URL_INSTRUMENT_SHOWRESULT}",
            "sAjaxDataProp": "dataList",//查询后，返回的集合
            "fnServerData": function ( sSource, aoData, fnCallback ) {  //查询条件
                aoData.push(
                    { "name": "mkMedicalInstrumenId", "value": $("#mkMedicalInstrumenId").val() }
                );
                $.ajax( {
                    "dataType": 'json',
                    "url": sSource,
                    "type":'post',
                    "data": aoData,
                    "success": fnCallback
                } );
            },

            "aoColumns" : [{
                "mDataProp" : "hospName"
            },{
                "mDataProp" : "mKMedicalinstrumentId"
            },{
                "mDataProp" : "testItemName"
            },{
                "mDataProp" : "testItemNameen"
            },{
                "mDataProp" : "testValue"
            },{
                "mDataProp" : "testTime"
            }],

            "createdRow": function (row, data, index) {
                $('td', row).eq(0).addClass('border_left');
                $('td', row).eq(5).addClass('border_right');
            },
            "oLanguage": {//插件的汉化
                "sLengthMenu": "每页显示 _MENU_ 条记录",
                "sZeroRecords": "抱歉， 没有找到",
                "sInfo": "当前显示 _START_ 到 _END_条 ,共 _TOTAL_ 条记录",
                "sInfoEmpty": "没有数据",
                "sInfoFiltered": "(从 _MAX_ 条数据中检索)",
                "oPaginate": {
                    "sFirst": "首页",
                    "sPrevious": "上一页",
                    "sNext": "下一页",
                    "sLast": "末页"
                },
                "sZeroRecords": "没有检索到数据",
                "sProcessing": "<img src='' />",
                "sSearch": "搜索"
            }

        });
    }
    $(document).ready(function () {
        initTable();
        $('#example tr th').eq(0).addClass('border_left');
        $('#example tr th').eq(5).addClass('border_right');
        $('#example tbody tr td').addClass('active');
        $('#example tr td').eq(5).addClass('border_right');
        $('#example_paginate').parent().addClass('pagewidth');
        $('#example_info').parent().addClass('showPage');
        $('#example_length').parent().addClass('pageNow');
    });

</script>
</body>
</html>